﻿using BankSystem.Classes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BankSystem.Forms
{
    public partial class BalanceForm : Form
    {
        ParentForm parentForm;

        public BalanceForm(ParentForm form)
        {
            InitializeComponent();
            this.MdiParent = form;
            parentForm = form;
            WindowState = FormWindowState.Normal;
            MaximizeBox = false;
            Dock = DockStyle.Fill;
        }

        public void updateText(Account account)
        {
            this.textBoxBalance.Text = "账号 " + account.getID() + "  的余额是：" + account.getBalance() + " 元";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            parentForm.jumpToMainForm(this);
        }
    }
}
